A Look Back on 30+ Months of Self-Hosting
A long time ago, when I was working as an IT consultant, a younger colleague asked me if I knew of a book that described how to set up an Active Directory domain so that it’d be ready for production and the setup incorporate all the best practices. I didn’t have an answer for him then. Looking back at what I’ve done in the past 30+ months I realized that I’ve compiled what he asked for – just not on the topic of Active Directory but on building a self-hosted home server that provides all services locally without any reliance on cloud services.
Why Self-Hosting?
Why did I embark on this journey that turned out be a lot longer and convoluted than I had, somewhat naively, imagined when I set out?
Long-Term Availability
I was building a house and I was (and still am) thinking long-term. Cloud services suffer from multiple weaknesses. Apart from cost and (IoT!) security concerns I was worried about vendors shutting off their servers when a product line wouldn’t be lucrative enough anymore or when a product would be superseded by a newer variant. This, sadly, happens far too often. Buildings last decades, (IoT) cloud offerings merely years. When one outlives the other by such an order of magnitude, obsolescence needs to be a major concern from day one.
Functionality and Security
As a rule of thumb, hardware vendors don’t “get” software. This is especially true for home and IoT products. Devices can often be controlled by some vendor app, but essential security and functionality aspects are often ignored:
- Communication happens via unsecured HTTP
- In some cases, HTTPS upgrade via reverse proxy is prevented by choosing unencrypted web sockets when HTTPS is used.
- APIs are missing or incomplete
Single Control Pane
Nobody wants dozens of incompatible vendor apps, each with their own UI logic, to control all aspects of a home. In fact, the notion that each vendor “owns” the access to “their” devices is quite ridiculous. Instead, home residents want almost exactly the opposite: one app to control all relevant aspects of their home.
ONE.
This is only achievable by integrating every device and appliance into one centrally managed system: Home Assistant.
The Downsides of Self-Hosting
Of course, it’s not all sunshine and roses when it comes to self-hosting. Let’s not beat around the bush: many things can go wrong. Here’s a sampler.
You’re on Your Own
This should be obvious but it’s too important not to mention it. You’ll be dealing with fairly complex products and technologies including several you may not (yet?) be familiar with. This includes networking in general, IPv6 and firewalls in particular, Linux, Samba, and Docker, to mention a few others. If you run into problems, you’re on your own.
Of course, the internet community is your friend, but in my experience not every solution is handily available in a blog post, AI chat, or video. Quite the contrary. I found time and again that when it comes to the nitty gritty details, the internet is sadly devoid of correct information. That, by the way, is the main reason I documented my setup in such detail.
In For the Long Term
I hate to remind you, but you’re not getting younger. What happens when you’re sick or old and can’t maintain your home server? What happens when you die?
Those are questions that need answers if you’re home’s functioning depends in any way on the availability of your home server. That brings us neatly to my next point.
Dependencies
By taking the step and making your home’s functionality – lights, heating, etc. – dependent on your home server, you’re introducing a significant risk that affects the most significant aspect of any IT service: availability. Consider the following: Are you prepared to suffer the consequences of, say, not being able to operate your lights when there’s a problem with your home server?
I hope the above makes it clear that, in my opinion, dependencies need to be managed carefully. For my part, I want all the basic functions of my home to work independently of my home server. The blinds, lights, heating, etc. all need to be reliable, resilient, and available. Services provided by my home server are optional add-ons that may be comfortable, but must not be essential.
What Worked for Me
Software
Of the various products I’ve implemented over the years, the following stand out because they work exceptionally well – for me. Please keep in mind that this is a very subjective list loosely ordered by the time of my initial implementation.
Proxmox
Super-solid base OS for a home server (see my full article).
Caddy
Automatic HTTPS, isolation of insecure (IoT) devices, authentication for otherwise unprotected services (see my full article).
Authelia
SSO for almost anything (see my full article).
restic
Fast, encrypted, automated offsite backup (see my full article).
Samba
Fast and reliable file server. Doubles as LDAP user directory for Authelia (see my article series starting here).
OPNsense
Flexible firewall with great VLAN support (see my full article).
Hardware
Home Server
The Intel NUC I selected back in 2022 is still doing great. All the dockerized and virtualized services combined generate a system load of less than 1%. In absolute numbers, the CPU usage is at approx. 10% and the RAM usage at around 40% (of 64 GB, including caches). Thanks to two SSDs (one NVMe and the other SATA, due to limitations of the NUC) I’ve never experienced IO wait times – IO utilization is at around 4%.
Firewall
I’m also very happy with my Protectli VP2420, a low-power passively cooled server with four 2.5G Ethernet ports. The Protectli works very will with OPNsense, my firewall distribution of choice (see above).
Closing Thoughts
As you can see from my software list above, you’ll be building a lot of infrastructure before you can (or, at least, should) deploy your first productive service. Things like encryption, authentication, or backup may sound boring (to me they don’t!) but they’re absolutely essential for the safe and secure operation of your home server.
If you don’t enjoy building and maintaining IT systems, you may be better off with cloud services. But if you’re willing to invest the time and effort, self-hosting can be very rewarding. You get a home without dependencies on external services where you’re in full control of a system that’s tailored to your needs and preferences.